<template>
  <div class="xiaoli">
    <h2>校名：{{ schoolName }}</h2>
    <h2>地址：{{ schoolAddress }}</h2>
    <button @click="showTel">点我看联系方式</button>
  </div>
</template>

<script>
  export default {
    name:'School',
    data() {
      return {
        schoolName:'尚硅谷',
        schoolAddress:'宏福科技园',
        tel:'010-56253825'
      }
    },
    methods: {
      showTel(){
        alert(this.tel)
      }
    },
  }
</script>

<style scoped>
  .xiaoli {
    margin-top: 10px;
    background-color: orange;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
  }
</style>